<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />

		<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
		Remove this if you use the .htaccess -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

		<title>web03</title>
		<meta name="description" content="" />
		<meta name="author" content="josephJang" />

		<meta name="viewport" content="width=device-width; initial-scale=1.0" />

		<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
		<link rel="shortcut icon" href="/favicon.ico" />
		<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
		<script src="jquery.min.js"></script>
		<script>
			//ol의 내용을 바꾸고 싶다
			window.onload=function(){
				//li요소 노드 집합의 개수를 알려줍니다. p.70
				liArray=document.getElementsByTagName("li");
				console.log("li몇개",liArray.length,"개");
				//p.75
				li_len = liArray.length;
				while(0<li_len--){
					var li_text = liArray[li_len].firstChild.nodeValue;
					console.log(li_text);
				}
				var $h1 = jQuery('h1');
				$h1.text("jQuery로 h1의 내용을 바꾸었습니다");
			}
		</script>
	</head>

	<body>
		<div>
			<header>
				<h1>web03</h1>
			</header>
			<nav>
				<p>
					<a href="/">Home</a>
				</p>
				<p>
					<a href="/contact">Contact</a>
				</p>
			</nav>

			<div>
				<ol>
					<li> 순서대</li>
					<li> 번호가 매겨지는 ol</li>
				</ol>
			</div>

			<footer>
				<p>
					&copy; Copyright  by ch choongang
				</p>
			</footer>
		</div>
	</body>
</html>
